//
//	ZcoModelInvitationProgress.m
//	Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport



#import "ZcoModelInvitationProgress.h"

NSString *const kZcoModelInvitationProgressAgent = @"agent";
NSString *const kZcoModelInvitationProgressAgentState = @"agentState";
NSString *const kZcoModelInvitationProgressAt = @"at";
NSString *const kZcoModelInvitationProgressIdField = @"id";
NSString *const kZcoModelInvitationProgressPosition = @"position";
NSString *const kZcoModelInvitationProgressStatus = @"status";
NSString *const kZcoModelInvitationProgressWaitingNum = @"waitingNum";
NSString *const kZcoModelInvitationProgressWaitingReasonCode = @"waitingReasonCode";
NSString *const kZcoModelInvitationProgressWaitingReasonMessage = @"waitingReasonMessage";

@interface ZcoModelInvitationProgress ()
@end
@implementation ZcoModelInvitationProgress




/**
 * Instantiate the instance using the passed dictionary values to set the properties values
 */

-(instancetype)initWithDictionary:(NSDictionary *)dictionary
{
	self = [super init];
	if(![dictionary[kZcoModelInvitationProgressAgent] isKindOfClass:[NSNull class]]){
		self.agent = [[ZcoModelAgent alloc] initWithDictionary:dictionary[kZcoModelInvitationProgressAgent]];
	}

	if(![dictionary[kZcoModelInvitationProgressAgentState] isKindOfClass:[NSNull class]]){
		self.agentState = dictionary[kZcoModelInvitationProgressAgentState];
	}	
	if(![dictionary[kZcoModelInvitationProgressAt] isKindOfClass:[NSNull class]]){
		self.at = dictionary[kZcoModelInvitationProgressAt];
	}	
	if(![dictionary[kZcoModelInvitationProgressIdField] isKindOfClass:[NSNull class]]){
		self.idField = dictionary[kZcoModelInvitationProgressIdField];
	}	
	if(![dictionary[kZcoModelInvitationProgressPosition] isKindOfClass:[NSNull class]]){
		self.position = [dictionary[kZcoModelInvitationProgressPosition] integerValue];
	}

	if(![dictionary[kZcoModelInvitationProgressStatus] isKindOfClass:[NSNull class]]){
		self.status = dictionary[kZcoModelInvitationProgressStatus];
	}	
	if(![dictionary[kZcoModelInvitationProgressWaitingNum] isKindOfClass:[NSNull class]]){
		self.waitingNum = [dictionary[kZcoModelInvitationProgressWaitingNum] integerValue];
	}

	if(![dictionary[kZcoModelInvitationProgressWaitingReasonCode] isKindOfClass:[NSNull class]]){
		self.waitingReasonCode = dictionary[kZcoModelInvitationProgressWaitingReasonCode];
	}	
	if(![dictionary[kZcoModelInvitationProgressWaitingReasonMessage] isKindOfClass:[NSNull class]]){
		self.waitingReasonMessage = dictionary[kZcoModelInvitationProgressWaitingReasonMessage];
	}	
	return self;
}


/**
 * Returns all the available property values in the form of NSDictionary object where the key is the approperiate json key and the value is the value of the corresponding property
 */
-(NSDictionary *)toDictionary
{
	NSMutableDictionary * dictionary = [NSMutableDictionary dictionary];
	if(self.agent != nil){
		dictionary[kZcoModelInvitationProgressAgent] = [self.agent toDictionary];
	}
	if(self.agentState != nil){
		dictionary[kZcoModelInvitationProgressAgentState] = self.agentState;
	}
	if(self.at != nil){
		dictionary[kZcoModelInvitationProgressAt] = self.at;
	}
	if(self.idField != nil){
		dictionary[kZcoModelInvitationProgressIdField] = self.idField;
	}
	dictionary[kZcoModelInvitationProgressPosition] = @(self.position);
	if(self.status != nil){
		dictionary[kZcoModelInvitationProgressStatus] = self.status;
	}
	dictionary[kZcoModelInvitationProgressWaitingNum] = @(self.waitingNum);
	if(self.waitingReasonCode != nil){
		dictionary[kZcoModelInvitationProgressWaitingReasonCode] = self.waitingReasonCode;
	}
	if(self.waitingReasonMessage != nil){
		dictionary[kZcoModelInvitationProgressWaitingReasonMessage] = self.waitingReasonMessage;
	}
	return dictionary;

}

/**
 * Implementation of NSCoding encoding method
 */
/**
 * Returns all the available property values in the form of NSDictionary object where the key is the approperiate json key and the value is the value of the corresponding property
 */
- (void)encodeWithCoder:(NSCoder *)aCoder
{
	if(self.agent != nil){
		[aCoder encodeObject:self.agent forKey:kZcoModelInvitationProgressAgent];
	}
	if(self.agentState != nil){
		[aCoder encodeObject:self.agentState forKey:kZcoModelInvitationProgressAgentState];
	}
	if(self.at != nil){
		[aCoder encodeObject:self.at forKey:kZcoModelInvitationProgressAt];
	}
	if(self.idField != nil){
		[aCoder encodeObject:self.idField forKey:kZcoModelInvitationProgressIdField];
	}
	[aCoder encodeObject:@(self.position) forKey:kZcoModelInvitationProgressPosition];	if(self.status != nil){
		[aCoder encodeObject:self.status forKey:kZcoModelInvitationProgressStatus];
	}
	[aCoder encodeObject:@(self.waitingNum) forKey:kZcoModelInvitationProgressWaitingNum];	if(self.waitingReasonCode != nil){
		[aCoder encodeObject:self.waitingReasonCode forKey:kZcoModelInvitationProgressWaitingReasonCode];
	}
	if(self.waitingReasonMessage != nil){
		[aCoder encodeObject:self.waitingReasonMessage forKey:kZcoModelInvitationProgressWaitingReasonMessage];
	}

}

/**
 * Implementation of NSCoding initWithCoder: method
 */
- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
	self = [super init];
	self.agent = [aDecoder decodeObjectForKey:kZcoModelInvitationProgressAgent];
	self.agentState = [aDecoder decodeObjectForKey:kZcoModelInvitationProgressAgentState];
	self.at = [aDecoder decodeObjectForKey:kZcoModelInvitationProgressAt];
	self.idField = [aDecoder decodeObjectForKey:kZcoModelInvitationProgressIdField];
	self.position = [[aDecoder decodeObjectForKey:kZcoModelInvitationProgressPosition] integerValue];
	self.status = [aDecoder decodeObjectForKey:kZcoModelInvitationProgressStatus];
	self.waitingNum = [[aDecoder decodeObjectForKey:kZcoModelInvitationProgressWaitingNum] integerValue];
	self.waitingReasonCode = [aDecoder decodeObjectForKey:kZcoModelInvitationProgressWaitingReasonCode];
	self.waitingReasonMessage = [aDecoder decodeObjectForKey:kZcoModelInvitationProgressWaitingReasonMessage];
	return self;

}

/**
 * Implementation of NSCopying copyWithZone: method
 */
- (instancetype)copyWithZone:(NSZone *)zone
{
	ZcoModelInvitationProgress *copy = [ZcoModelInvitationProgress new];

	copy.agent = [self.agent copy];
	copy.agentState = [self.agentState copy];
	copy.at = [self.at copy];
	copy.idField = [self.idField copy];
	copy.position = self.position;
	copy.status = [self.status copy];
	copy.waitingNum = self.waitingNum;
	copy.waitingReasonCode = [self.waitingReasonCode copy];
	copy.waitingReasonMessage = [self.waitingReasonMessage copy];

	return copy;
}
@end